package zlatan_demo12_stu_score

//综合案列：学生成绩单
object ClassDemo01 {
  def main(args: Array[String]): Unit = {
    val stuList = List(("张三", 37, 90, 100), ("李四", 90, 73, 81),
      ("王五", 60, 90, 76), ("赵六", 59, 21, 72), ("田七", 100, 100, 100))
    //语文成绩大于60
    val chineseList = stuList.filter(_._2 >= 60)
    //获取所有学生的总成绩
    val totalList = stuList.map((x) => x._1 -> (x._2 + x._3 + x._4))
    //按总成绩降序排序
    val sortTotalList=stuList.sortWith(_._2>_._2)
    println(sortTotalList)
  }

}
